/*
 * @Author: linjituan linjituan@revolution.com
 * @Date: 2024-10-23 20:28:13
 * @LastEditors: linjituan linjituan@revolution.com
 * @LastEditTime: 2024-10-24 16:06:18
 * @FilePath: \hm-twx-admin\src\api\pin\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { defHttp } from '@/utils/http/axios'

// 查询node_pin列表
export function getPinPage(params) {
  return defHttp.get({ url: 'https://man.metaid.io/api/getAllPinByPath', params })
}

// 查询node_pin详情
export function getPin(id: number) {
  return defHttp.get({ url: `/app-api/node/pin/get?id=${id}` })
}

// 新增node_pin
export function createPin(data) {
  return defHttp.post({ url: '/app-api/node/pin/create', data })
}

// 修改node_pin
export function updatePin(data) {
  return defHttp.put({ url: '/app-api/node/pin/update', data })
}

// 删除node_pin
export function deletePin(id: number) {
  return defHttp.delete({ url: `/app-api/node/pin/delete?id=${id}` })
}

// 导出node_pin Excel
export function exportPin(params) {
  return defHttp.download({ url: '/app-api/node/pin/export-excel', params }, 'node_pin.xls')
}
